package pacBioSimple;

import java.util.concurrent.Callable;

public class ThreadAlignmentTraceback implements Callable<AlignmentObject> {
	
	private AlignmentObject tobeAlgin= null;
	
	public ThreadAlignmentTraceback(AlignmentObject tobeAlign)
	{
		this.tobeAlgin=tobeAlign;
	}
	
	public AlignmentObject runIt()
	{
		if(tobeAlgin.getA().equals(""))
			return tobeAlgin;
			
			AlignmentObject newTobeAlign= new NeedlemanWunsch(this.tobeAlgin).affineCompareWithTraceBack();
			return newTobeAlign;
		
	}
	
	
	@Override
	public AlignmentObject call() throws Exception {
		
		if(tobeAlgin.getA().equals(""))
		return tobeAlgin;
		
		AlignmentObject newTobeAlign= new NeedlemanWunsch(this.tobeAlgin).affineCompareWithTraceBack();
		return newTobeAlign;
	}

}
